

###   有序数组的平方
import math

def square(nums):
    for i in range(0,len(nums)):
        nums[i] = int(math.pow(nums[i],2))
    nums.sort()
    return nums

if __name__ == "__main__":
    arr = input()
    n = [int(i) for i in arr.split()]
    n = square(n)
    print(n)